package com.itheima.service;

import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.pojo.Permission;

/**
        * @Description: 权限
        * @Param:
        * @return:
        * @Author: 文攀
        * @Date: 2021/12/7
        */
public interface WpPermissionsService {

        /**
            * @Description: 分页查询权限
            * @Param:
            * @return:
            * @Author: 文攀
            * @Date: 2021/12/7
            */
    PageResult findPage(QueryPageBean queryPageBean);

        /**
            * @Description:  新增权限项
            * @Param:
            * @return:
            * @Author: 文攀
            * @Date: 2021/12/7
            */
        void save(Permission permission);

    /**
     * @Description: 根据id查询权限项
     * @Param: id
     * @return: permission
     * @Author: 文攀
     * @Date: 2021/12/7
     */
    Permission findById( Integer id);


        /**
            * @Description: 修改权限
            * @Param: permission
            * @return:
            * @Author: 文攀
            * @Date: 2021/12/7
            */
    void edit(Permission permission);
    /** 
        * @Description: 删除权限 
        * @Param:  
        * @return:  
        * @Author: 文攀
        * @Date: 2021/12/7 
        */ 
    void delete(Integer id);

        /**
            * @Description: 查询当前权限是否被引用
            * @Param:  id
            * @return:  int
            * @Author: 文攀
            * @Date: 2021/12/8
            */
    Integer findPermissionReferencedCount(Integer id);
}
